using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Velsto
{
    public partial class cBack : Form, MapWinGIS.ICallback
    {

        public cBack()
        {
            InitializeComponent();
            this.Text = "Progress";
        }

        public void Error(string KeyOfSender, string ErrorMsg)
        {
            this.label1.Text = ErrorMsg;
            this.Refresh();

            //Console.WriteLine(KeyOfSender + ":" + ErrorMsg);
        }

        public void Progress(string KeyOfSender, int Percent, string Message)
        {
            this.label1.Text = Message;
            if (Percent >= 0 || Percent <= 100) this.progressBar1.Value = Percent;
            
            this.Refresh();
            //Console.WriteLine("Progress: " + Percent + "% " + Message);
        } 

    }
}